home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The PC-SIG Library 10
/
The PC-Sig Library - Shareware for the IBM PC and Compatibles (PC-SIG)(Tenth Edition Disks 1-2804)(1991).iso
/
PC_SIGCD
/
19
/
5
/
DISK1959.ZIP
/
EDFIX2.DOC
< prev
next >
Wrap
Text File
|
1989-07-23
|
13KB
|
253 lines
DOCUMENTATION FOR EDFIX2
INTRODUCTION
EDFIX2 is a program that will read, edit, write, and transfer
random-access files. The file to be edited may be as long as two
billion bytes, and each record may be as much as 2048 bytes long.
EDFIX2 will work on any file, even if the file is not truly a
random-access file. In a true random-access file, each record will have
precisely the same length. dBase files are not random-access files;
each dBase data file begins with a header that is generally not the same
length as any of the data records. Still, EDFIX2 can manipulate dBase
data files--except that EDFIX2 records will probably not match up with
dBase records. (The only thing that belongs in data files is data, and
indexes, names, and all that other stuff belong elsewhere!)
You may also use EDFIX2 on spreadsheet files and files created by
various other software packages. Those files, too, are not random-
access files (and don't pretend to be).
EDFIX2 can severely damage a file if you don't know what you're
doing or make a mistake. Make sure you always have backups of the file
you're altering.
If you ask EDFIX2 to edit a file that doesn't exist (or has a length
of zero), EDFIX2 will tell you so. The file will be deleted if it had a
length of zero. You may not open and edit a file of length zero.
SCREEN DISPLAY
If possible, EDFIX2 will display exactly what's in the file, ASCII
text or not. If the file data is stored (all or in part) in binary
format, the screen display may be confusing; if EDFIX2 were to display
some of those characters, the screen might clear, or lines might
overwrite other lines. So, some "dangerous" characters have been
translated into another character. Carriage returns are translated into
a left-pointing arrow, and line feeds into a downward-pointing arrow.
Other "dangerous" control codes (7, 11, 28-31) are translated into the
graphics character 128 higher.
To see the ASCII or hexadecimal code for the character the cursor is
on, press the ESC key. At the bottom right of the screen, EDFIX2 will
display the decimal and hexadecimal code for that character.
RECORD LENGTH
If you don't know the record length of each record in the file,
EDFIX2 can calculate some possibilities, based on the file length. If
there aren't very many possibilities (less than 5), EDFIX2 will suggest
other possible record lengths that are nearly right--the file length is
off by only one byte, which might be a CTRL-Z end-of-file marker. If
your data file ends with more than one sequential file EOF character,
you may have to try some guesses of your own.
If your guess doesn't match the actual file length, EDFIX2 will tell
you how many bytes are left over, and will ask you if you want to try
another length. Any leftover bytes will not be displayed by EDFIX2; you
may see and alter only complete records, because allowing you to do
otherwise might change the length of the data file. Most programs will
not take kindly to any unauthorized alterations in the file length, so
that's why EDFIX2 won't allow you to change any final partial record.
If each of your records are followed by a carriage return or
carriage return and line feed, you must treat those characters as a part
of your record. A 272-byte record followed by a carriage return is
really a 273-byte record. A 272-byte record followed by a carriage
return and line feed is really a 274-byte record.
1
If you guess at a record length and see that you're wrong once the
file has been opened, you may press CTRL-B and try another guess.
EDITING DATA
Once you've entered the name of the data file and the associated
record length, EDFIX2 will read the data file and display the first 20
records. Records past the end of the data file will be indicated by the
legend "PAST EOF". You won't be able to move to or edit those records.
The bottom portion of the screen will also display information about
the current file. You will be shown the file name, the number of
records in the file, the current cursor position, and the current record
number. Depending on the situation, you may also be shown the current
mode (insert or overtype) or an error message about the length of a
record. That part of the screen is also used for you to input the name
of the transfer file and to display the status of the transfer.
You may move to or within a record or edit an existing record by
using the following commands:
COMMAND RESULT
Up Arrow Moves up one line to the previous record, if any.
CTRL-E Same as Up Arrow.
Down Arrow Moves down one line to the next record, if any.
CTRL-X Same as Down Arrow.
Right Arrow Moves one character to the right, if possible.
CTRL-D Same as Right Arrow.
Left Arrow Moves one character to the left, if possible.
CTRL-S Same as Left Arrow.
Home Moves to the start of the current record.
End Moves to the end of the current record.
PG UP Moves up 20 records (towards the file beginning).
CTRL-R Same as PG UP.
PG DN Moves down 20 records, if possible.
CTRL-C Same as PG DN.
CTRL-PG UP Moves to the beginning of the file.
CTRL-PG DN Moves to the end of the file.
CTRL-J Moves to whatever record number you like.
TAB Moves to the next tab position (tabs set every 8).
CTRL-F Same as TAB.
Backtab Moves to the previous tab position.
CTRL-A Same as Backtab.
DEL Deletes the character at the current cursor position.
CTRL-G Same as DEL.
Backspace Deletes the character to the left and moves left.
INS Changes mode from insert to delete and vice-versa.
CTRL-V Same as INS.
CTRL-Y Mark the current record as deleted (all ASCII 250s).
CTRL-B Exit the file. Don't save changes on the current screen.
Return to the 'record length' selection and make another
guess.
CTRL-P Accept the next keystroke as a character, even if it is a
control code. CTRL-P followed by ENTER will insert or
overtype a carriage return (ASCII 13) into the file.
ESC Display the ASCII and hexadecimal value of the character
at the current cursor position.
EDFIX2 starts in overtype mode: any character you type will replace
the current character at the current cursor position. When you press
CTRL-V or the INS key, EDFIX2 will change to insert mode and any
2
characters you type will be inserted within the line, moving existing
characters to the right. Pressing the INS key or CTRL-V again will
change the mode back to overtype.
If you alter a record so the length doesn't match the record length
you specified earlier, EDFIX2 will refuse to save the record until you
add or delete enough characters to make the record the correct length.
This is done because EDFIX2 cannot determine how to pad the record (or
what data to throw away).
When you move up or down through the data file, EDFIX2 will check
any records that move off the current screen. If they have been altered
and if they are the correct length, EDFIX2 will write them to the disk.
If they have been altered and they are not the correct length, EDFIX2
will notify you of the problem, position the cursor on the offending
record, and tell you what the record's length is.
If you move far enough to the left or right, EDFIX2 will scroll
horizontally in increments of 40 characters at a time.
INSERTING CONTROL CODES AND OTHER CHARACTERS
Pressing CTRL-P will tell EDFIX2 to accept the next character typed
and (depending on whether you're in insert or overtype mode) insert that
character into the current record or replace the current character with
the one you type in. If you're entering normal ASCII data, you won't
need the CTRL-P command.
The CTRL-P command will thus allow you to insert any control code or
graphics character into the data file.
There's an easy way to enter any particular code. Rather than try
to remember that ASCII 18 is control-R, you may hold down the ALT key
and type the digits 018 on the numeric keypad. Then release the ALT
key, and EDFIX2 will act as though you had entered ctrl-R. Just
remember to enter CTRL-P first, and ASCII 18 will be put into the
current record.
TRANSFERRING AND SAVING RECORDS
You may save your changes and exit to MSDOS by pressing CTRL-KD.
You may save the changes on any screen by moving off that screen--for
example, by pressing PG UP, PG DN, CTRL-PG UP, or CTRL-PG DN. All
changes on the current screen will also be saved when you press CTRL-KT
(transfer records).
If you make a severe mistake while editing a record and you want to
avoid saving the error, press CTRL-KQ. Any changes on the current
screen will not be saved, and EDFIX2 will return to MSDOS.
If you elect to transfer records, EDFIX2 will ask you for the name
of the file to which you want to transfer the data. If that file
already exists, EDFIX2 will ask you if you want to overwrite it. If
not, you will return to edit mode. If yes, the previous data file will
be completely destroyed and the new data will replace it. For that
reason, you must not transfer records into the same file you are
currently editing. EDFIX2 will stop you from doing this: MSDOS will not
permit you to erase a currently open file.
While transferring, EDFIX2 will show you how many records are in the
original data file and how many have been read. Records marked as
deleted will not be transferred to the new file. EDFIX2 marks records
as deleted by replacing the full contents of the record with copies of
ASCII character 250. None of the original contents of the record will
remain. This is not the method used by dBase, but it is the method used
by The CREATOR (tm, TNT Software). Deleted records in dBase are marked
by the presence of an asterisk in the first position of the record.
3
ADDITIONAL INFORMATION
EDFIX2 is shareware. You may distribute copies of EDFIX2 so long as
you don't ask people to pay you for their copy. You may not sell EDFIX2
without the written permission of TNT Software. EDFIX2 is copyrighted
and is the property of TNT Software. It is NOT in the public domain.
If you like EDFIX2 and want to encourage the development (or
enhancement) of more such software, please register your copy.
Registered users will be sent a copy of the latest version, complete
with full source code (Microsoft Quick BASIC). The registration fee for
EDFIX2 is $25. Only registered users are entitled to support from
T.N.T. Software.
Whether you're a registered user or not, we welcome your comments
and suggestions for making EDFIX2 better.
If you're interested in other products of TNT Software, write or
call:
TNT SOFTWARE INC.
ATTN: Bruce W. Tonkin
34069 Hainesville Road
Round Lake IL 60073
(312) 223-8595
4